<script setup lang="ts">
import { computed, onBeforeMount, onBeforeUpdate, onMounted, onUpdated, ref, watch } from 'vue'
const res = ref(123)
onMounted(() => {
  console.log('组件完成挂载')
})
onBeforeMount(() => {
  console.log('组件挂载前')
})
onBeforeUpdate(() => {
  console.log('数据更新渲染前')
})
onUpdated(() => {
  console.log('数据更新渲染完成')
})
</script>

<template>
  <h2 @click="res++">生命周期函数{{ res }}</h2>
</template>

<style></style>
